{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import cv2\n",
    "import numpy as np\n",
    "from keras import layers\n",
    "from keras.layers import Input,Dense,Activation,ZeroPadding2D,\\\n",
    "    BatchNormalization,Flatten,Conv2D,AveragePooling2D,MaxPooling2D\n",
    "import os\n",
    "import keras\n",
    "from keras.models import Model\n",
    "import keras.backend as K\n",
    "K.set_image_data_format(\"channels_last\")\n",
    "K.set_learning_phase(1)\n",
    "from keras.callbacks import ModelCheckpoint\n",
    "seed = 7\n",
    "np.random.seed(seed)\n",
    "from keras.callbacks import ReduceLROnPlateau\n",
    "from keras.initializers import glorot_uniform\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "\n",
    "img_width, img_height = 80, 80\n",
    "\n",
    "train_data_dir = './train/'\n",
    "nb_epoch = 20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#恒等模块——identity_block\n",
    "def identity_block(X,f,filters,stage,block):\n",
    "    \"\"\"\n",
    "    三层的恒等残差块\n",
    "    param :\n",
    "    X -- 输入的张量，维度为（m, n_H_prev, n_W_prev, n_C_prev）\n",
    "    f -- 整数，指定主路径的中间 CONV 窗口的形状\n",
    "    filters -- python整数列表，定义主路径的CONV层中的过滤器数目\n",
    "    stage -- 整数，用于命名层，取决于它们在网络中的位置\n",
    "    block --字符串/字符，用于命名层，取决于它们在网络中的位置\n",
    "    return:\n",
    "    X -- 三层的恒等残差块的输出，维度为：(n_H, n_W, n_C)\n",
    "    \"\"\"\n",
    "    #定义基本的名字\n",
    "    conv_name_base = \"res\"+str(stage)+block+\"_branch\"\n",
    "    bn_name_base = \"bn\"+str(stage)+block+\"_branch\"\n",
    " \n",
    "    #过滤器\n",
    "    F1,F2,F3 = filters\n",
    " \n",
    "    #保存输入值,后面将需要添加回主路径\n",
    "    X_shortcut = X\n",
    " \n",
    "    #主路径第一部分\n",
    "    X = Conv2D(filters=F1,kernel_size=(1,1),strides=(1,1),padding=\"valid\",\n",
    "               name=conv_name_base+\"2a\",kernel_initializer=glorot_uniform(seed=0))(X)\n",
    "    X = BatchNormalization(axis=3,name=bn_name_base+\"2a\")(X)\n",
    "    X = Activation(\"relu\")(X)\n",
    " \n",
    "    # 主路径第二部分\n",
    "    X = Conv2D(filters=F2,kernel_size=(f,f),strides=(1,1),padding=\"same\",\n",
    "               name=conv_name_base+\"2b\",kernel_initializer=glorot_uniform(seed=0))(X)\n",
    "    X = BatchNormalization(axis=3,name=bn_name_base+\"2b\")(X)\n",
    "    X = Activation(\"relu\")(X)\n",
    " \n",
    "    # 主路径第三部分\n",
    "    X = Conv2D(filters=F3,kernel_size=(1,1),strides=(1,1),padding=\"valid\",\n",
    "               name=conv_name_base+\"2c\",kernel_initializer=glorot_uniform(seed=0))(X)\n",
    "    X = BatchNormalization(axis=3,name=bn_name_base+\"2c\")(X)\n",
    " \n",
    "    # 主路径最后部分,为主路径添加shortcut并通过relu激活\n",
    "    X = layers.add([X,X_shortcut])\n",
    "    X = Activation(\"relu\")(X)\n",
    " \n",
    "    return X\n",
    " \n",
    "#卷积残差块——convolutional_block\n",
    "def convolutional_block(X,f,filters,stage,block,s=2):\n",
    "    \"\"\"\n",
    "    param :\n",
    "    X -- 输入的张量，维度为（m, n_H_prev, n_W_prev, n_C_prev）\n",
    "    f -- 整数，指定主路径的中间 CONV 窗口的形状（过滤器大小，ResNet中f=3）\n",
    "    filters -- python整数列表，定义主路径的CONV层中过滤器的数目\n",
    "    stage -- 整数，用于命名层，取决于它们在网络中的位置\n",
    "    block --字符串/字符，用于命名层，取决于它们在网络中的位置\n",
    "    s -- 整数，指定使用的步幅\n",
    "    return:\n",
    "    X -- 卷积残差块的输出，维度为：(n_H, n_W, n_C)\n",
    "    \"\"\"\n",
    "    # 定义基本的名字\n",
    "    conv_name_base = \"res\" + str(stage) + block + \"_branch\"\n",
    "    bn_name_base = \"bn\" + str(stage) + block + \"_branch\"\n",
    "    # 过滤器\n",
    "    F1, F2, F3 = filters\n",
    "    # 保存输入值,后面将需要添加回主路径\n",
    "    X_shortcut = X\n",
    "    # 主路径第一部分\n",
    "    X = Conv2D(filters=F1, kernel_size=(1, 1), strides=(s, s), padding=\"valid\",\n",
    "               name=conv_name_base + \"2a\", kernel_initializer=glorot_uniform(seed=0))(X)\n",
    "    X = BatchNormalization(axis=3, name=bn_name_base + \"2a\")(X)\n",
    "    X = Activation(\"relu\")(X)\n",
    "    # 主路径第二部分\n",
    "    X = Conv2D(filters=F2, kernel_size=(f, f), strides=(1, 1), padding=\"same\",\n",
    "               name=conv_name_base + \"2b\", kernel_initializer=glorot_uniform(seed=0))(X)\n",
    "    X = BatchNormalization(axis=3, name=bn_name_base + \"2b\")(X)\n",
    "    X = Activation(\"relu\")(X)\n",
    " \n",
    "    # 主路径第三部分\n",
    "    X = Conv2D(filters=F3, kernel_size=(1, 1), strides=(1, 1), padding=\"valid\",\n",
    "               name=conv_name_base + \"2c\", kernel_initializer=glorot_uniform(seed=0))(X)\n",
    "    X = BatchNormalization(axis=3, name=bn_name_base + \"2c\")(X)\n",
    "    #shortcut路径\n",
    "    X_shortcut = Conv2D(filters=F3,kernel_size=(1,1),strides=(s,s),padding=\"valid\",\n",
    "               name=conv_name_base+\"1\",kernel_initializer=glorot_uniform(seed=0))(X_shortcut)\n",
    "    X_shortcut = BatchNormalization(axis=3,name=bn_name_base+\"1\")(X_shortcut)\n",
    "    # 主路径最后部分,为主路径添加shortcut并通过relu激活\n",
    "    X = layers.add([X, X_shortcut])\n",
    "    X = Activation(\"relu\")(X)\n",
    " \n",
    "    return X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    " \n",
    "#50层ResNet模型构建\n",
    "def ResNet50(input_shape = (229,229,3),classes = 61):\n",
    "    #将输入定义为维度大小为 input_shape的张量\n",
    "    X_input = Input(input_shape)\n",
    "    # Zero-Padding\n",
    "    X = ZeroPadding2D((3,3))(X_input)\n",
    "    # Stage 1\n",
    "    X = Conv2D(64,kernel_size=(5,5),strides=(2,2),name=\"conv1\",\n",
    "               kernel_initializer=glorot_uniform(seed=0))(X)\n",
    "    X = BatchNormalization(axis=3,name=\"bn_conv1\")(X)\n",
    "    X = Activation(\"relu\")(X)\n",
    "    X = MaxPooling2D(pool_size=(3,3),strides=(2,2))(X)\n",
    "    # Stage 2\n",
    "    X = convolutional_block(X,f=3,filters=[64,64,256],stage=2,block=\"a\",s=1)\n",
    "    X = identity_block(X,f=3,filters=[64,64,256],stage=2,block=\"b\")\n",
    "    X = identity_block(X,f=3,filters=[64,64,256],stage=2,block=\"c\")\n",
    "    #Stage 3\n",
    "    X = convolutional_block(X,f=3,filters=[128,128,512],stage=3,block=\"a\",s=2)\n",
    "    X = identity_block(X,f=3,filters=[128,128,512],stage=3,block=\"b\")\n",
    "    X = identity_block(X,f=3,filters=[128,128,512],stage=3,block=\"c\")\n",
    "    X = identity_block(X,f=3,filters=[128,128,512],stage=3,block=\"d\")\n",
    "    # Stage 4\n",
    "    X = convolutional_block(X,f=3,filters=[256,256,1024],stage=4,block=\"a\",s=2)\n",
    "    X = identity_block(X,f=3,filters=[256,256,1024],stage=4,block=\"b\")\n",
    "    X = identity_block(X,f=3,filters=[256,256,1024],stage=4,block=\"c\")\n",
    "    X = identity_block(X,f=3,filters=[256,256,1024],stage=4,block=\"d\")\n",
    "    X = identity_block(X,f=3,filters=[256,256,1024],stage=4,block=\"e\")\n",
    "    X = identity_block(X,f=3,filters=[256,256,1024],stage=4,block=\"f\")\n",
    "    #Stage 5\n",
    "    X = convolutional_block(X,f=3,filters=[512,512,2048],stage=5,block=\"a\",s=2)\n",
    "    X = identity_block(X,f=3,filters=[256,256,2048],stage=5,block=\"b\")\n",
    "    X = identity_block(X,f=3,filters=[256,256,2048],stage=5,block=\"c\")\n",
    "    #最后阶段\n",
    "    #平均池化\n",
    "    X = AveragePooling2D(pool_size=(2,2))(X)\n",
    "    #输出层\n",
    "    X = Flatten()(X)\n",
    "    X = Dense(classes, activation='softmax', name='fc61')(X)\n",
    "    #创建模型\n",
    "    model = Model(inputs=X_input,outputs=X,name=\"ResNet50\")\n",
    " \n",
    "    return model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    " \n",
    "#运行构建的模型图\n",
    "model = ResNet50(input_shape=(img_width,img_height,3),classes=200)\n",
    "Adam=keras.optimizers.Adam(lr=0.0001)\n",
    "learning_rate_reduction = ReduceLROnPlateau(monitor='val_acc',\n",
    "                                            patience=2, \n",
    "                                            verbose=1, \n",
    "                                            factor=0.1, \n",
    "                                            min_lr=0.00000001)\n",
    "model.compile(optimizer=Adam, loss='categorical_crossentropy',metrics=['accuracy'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./train//FERET-001/01.tif\n",
      "./train//FERET-001/02.tif\n",
      "./train//FERET-001/03.tif\n",
      "./train//FERET-001/04.tif\n",
      "./train//FERET-001/05.tif\n",
      "./train//FERET-001/06.tif\n",
      "./train//FERET-001/07.tif\n",
      "./train//FERET-002/01.tif\n",
      "./train//FERET-002/02.tif\n",
      "./train//FERET-002/03.tif\n",
      "./train//FERET-002/04.tif\n",
      "./train//FERET-002/05.tif\n",
      "./train//FERET-002/06.tif\n",
      "./train//FERET-002/07.tif\n",
      "./train//FERET-003/01.tif\n",
      "./train//FERET-003/02.tif\n",
      "./train//FERET-003/03.tif\n",
      "./train//FERET-003/04.tif\n",
      "./train//FERET-003/05.tif\n",
      "./train//FERET-003/06.tif\n",
      "./train//FERET-003/07.tif\n",
      "./train//FERET-004/01.tif\n",
      "./train//FERET-004/02.tif\n",
      "./train//FERET-004/03.tif\n",
      "./train//FERET-004/04.tif\n",
      "./train//FERET-004/05.tif\n",
      "./train//FERET-004/06.tif\n",
      "./train//FERET-004/07.tif\n",
      "./train//FERET-005/01.tif\n",
      "./train//FERET-005/02.tif\n",
      "./train//FERET-005/03.tif\n",
      "./train//FERET-005/04.tif\n",
      "./train//FERET-005/05.tif\n",
      "./train//FERET-005/06.tif\n",
      "./train//FERET-005/07.tif\n",
      "./train//FERET-006/01.tif\n",
      "./train//FERET-006/02.tif\n",
      "./train//FERET-006/03.tif\n",
      "./train//FERET-006/04.tif\n",
      "./train//FERET-006/05.tif\n",
      "./train//FERET-006/06.tif\n",
      "./train//FERET-006/07.tif\n",
      "./train//FERET-007/01.tif\n",
      "./train//FERET-007/02.tif\n",
      "./train//FERET-007/03.tif\n",
      "./train//FERET-007/04.tif\n",
      "./train//FERET-007/05.tif\n",
      "./train//FERET-007/06.tif\n",
      "./train//FERET-007/07.tif\n",
      "./train//FERET-008/01.tif\n",
      "./train//FERET-008/02.tif\n",
      "./train//FERET-008/03.tif\n",
      "./train//FERET-008/04.tif\n",
      "./train//FERET-008/05.tif\n",
      "./train//FERET-008/06.tif\n",
      "./train//FERET-008/07.tif\n",
      "./train//FERET-009/01.tif\n",
      "./train//FERET-009/02.tif\n",
      "./train//FERET-009/03.tif\n",
      "./train//FERET-009/04.tif\n",
      "./train//FERET-009/05.tif\n",
      "./train//FERET-009/06.tif\n",
      "./train//FERET-009/07.tif\n",
      "./train//FERET-010/01.tif\n",
      "./train//FERET-010/02.tif\n",
      "./train//FERET-010/03.tif\n",
      "./train//FERET-010/04.tif\n",
      "./train//FERET-010/05.tif\n",
      "./train//FERET-010/06.tif\n",
      "./train//FERET-010/07.tif\n",
      "./train//FERET-011/01.tif\n",
      "./train//FERET-011/02.tif\n",
      "./train//FERET-011/03.tif\n",
      "./train//FERET-011/04.tif\n",
      "./train//FERET-011/05.tif\n",
      "./train//FERET-011/06.tif\n",
      "./train//FERET-011/07.tif\n",
      "./train//FERET-012/01.tif\n",
      "./train//FERET-012/02.tif\n",
      "./train//FERET-012/03.tif\n",
      "./train//FERET-012/04.tif\n",
      "./train//FERET-012/05.tif\n",
      "./train//FERET-012/06.tif\n",
      "./train//FERET-012/07.tif\n",
      "./train//FERET-013/01.tif\n",
      "./train//FERET-013/02.tif\n",
      "./train//FERET-013/03.tif\n",
      "./train//FERET-013/04.tif\n",
      "./train//FERET-013/05.tif\n",
      "./train//FERET-013/06.tif\n",
      "./train//FERET-013/07.tif\n",
      "./train//FERET-014/01.tif\n",
      "./train//FERET-014/02.tif\n",
      "./train//FERET-014/03.tif\n",
      "./train//FERET-014/04.tif\n",
      "./train//FERET-014/05.tif\n",
      "./train//FERET-014/06.tif\n",
      "./train//FERET-014/07.tif\n",
      "./train//FERET-015/01.tif\n",
      "./train//FERET-015/02.tif\n",
      "./train//FERET-015/03.tif\n",
      "./train//FERET-015/04.tif\n",
      "./train//FERET-015/05.tif\n",
      "./train//FERET-015/06.tif\n",
      "./train//FERET-015/07.tif\n",
      "./train//FERET-016/01.tif\n",
      "./train//FERET-016/02.tif\n",
      "./train//FERET-016/03.tif\n",
      "./train//FERET-016/04.tif\n",
      "./train//FERET-016/05.tif\n",
      "./train//FERET-016/06.tif\n",
      "./train//FERET-016/07.tif\n",
      "./train//FERET-017/01.tif\n",
      "./train//FERET-017/02.tif\n",
      "./train//FERET-017/03.tif\n",
      "./train//FERET-017/04.tif\n",
      "./train//FERET-017/05.tif\n",
      "./train//FERET-017/06.tif\n",
      "./train//FERET-017/07.tif\n",
      "./train//FERET-018/01.tif\n",
      "./train//FERET-018/02.tif\n",
      "./train//FERET-018/03.tif\n",
      "./train//FERET-018/04.tif\n",
      "./train//FERET-018/05.tif\n",
      "./train//FERET-018/06.tif\n",
      "./train//FERET-018/07.tif\n",
      "./train//FERET-019/01.tif\n",
      "./train//FERET-019/02.tif\n",
      "./train//FERET-019/03.tif\n",
      "./train//FERET-019/04.tif\n",
      "./train//FERET-019/05.tif\n",
      "./train//FERET-019/06.tif\n",
      "./train//FERET-019/07.tif\n",
      "./train//FERET-020/01.tif\n",
      "./train//FERET-020/02.tif\n",
      "./train//FERET-020/03.tif\n",
      "./train//FERET-020/04.tif\n",
      "./train//FERET-020/05.tif\n",
      "./train//FERET-020/06.tif\n",
      "./train//FERET-020/07.tif\n",
      "./train//FERET-021/01.tif\n",
      "./train//FERET-021/02.tif\n",
      "./train//FERET-021/03.tif\n",
      "./train//FERET-021/04.tif\n",
      "./train//FERET-021/05.tif\n",
      "./train//FERET-021/06.tif\n",
      "./train//FERET-021/07.tif\n",
      "./train//FERET-022/01.tif\n",
      "./train//FERET-022/02.tif\n",
      "./train//FERET-022/03.tif\n",
      "./train//FERET-022/04.tif\n",
      "./train//FERET-022/05.tif\n",
      "./train//FERET-022/06.tif\n",
      "./train//FERET-022/07.tif\n",
      "./train//FERET-023/01.tif\n",
      "./train//FERET-023/02.tif\n",
      "./train//FERET-023/03.tif\n",
      "./train//FERET-023/04.tif\n",
      "./train//FERET-023/05.tif\n",
      "./train//FERET-023/06.tif\n",
      "./train//FERET-023/07.tif\n",
      "./train//FERET-024/01.tif\n",
      "./train//FERET-024/02.tif\n",
      "./train//FERET-024/03.tif\n",
      "./train//FERET-024/04.tif\n",
      "./train//FERET-024/05.tif\n",
      "./train//FERET-024/06.tif\n",
      "./train//FERET-024/07.tif\n",
      "./train//FERET-025/01.tif\n",
      "./train//FERET-025/02.tif\n",
      "./train//FERET-025/03.tif\n",
      "./train//FERET-025/04.tif\n",
      "./train//FERET-025/05.tif\n",
      "./train//FERET-025/06.tif\n",
      "./train//FERET-025/07.tif\n",
      "./train//FERET-026/01.tif\n",
      "./train//FERET-026/02.tif\n",
      "./train//FERET-026/03.tif\n",
      "./train//FERET-026/04.tif\n",
      "./train//FERET-026/05.tif\n",
      "./train//FERET-026/06.tif\n",
      "./train//FERET-026/07.tif\n",
      "./train//FERET-027/01.tif\n",
      "./train//FERET-027/02.tif\n",
      "./train//FERET-027/03.tif\n",
      "./train//FERET-027/04.tif\n",
      "./train//FERET-027/05.tif\n",
      "./train//FERET-027/06.tif\n",
      "./train//FERET-027/07.tif\n",
      "./train//FERET-028/01.tif\n",
      "./train//FERET-028/02.tif\n",
      "./train//FERET-028/03.tif\n",
      "./train//FERET-028/04.tif\n",
      "./train//FERET-028/05.tif\n",
      "./train//FERET-028/06.tif\n",
      "./train//FERET-028/07.tif\n",
      "./train//FERET-029/01.tif\n",
      "./train//FERET-029/02.tif\n",
      "./train//FERET-029/03.tif\n",
      "./train//FERET-029/04.tif\n",
      "./train//FERET-029/05.tif\n",
      "./train//FERET-029/06.tif\n",
      "./train//FERET-029/07.tif\n",
      "./train//FERET-030/01.tif\n",
      "./train//FERET-030/02.tif\n",
      "./train//FERET-030/03.tif\n",
      "./train//FERET-030/04.tif\n",
      "./train//FERET-030/05.tif\n",
      "./train//FERET-030/06.tif\n",
      "./train//FERET-030/07.tif\n",
      "./train//FERET-031/01.tif\n",
      "./train//FERET-031/02.tif\n",
      "./train//FERET-031/03.tif\n",
      "./train//FERET-031/04.tif\n",
      "./train//FERET-031/05.tif\n",
      "./train//FERET-031/06.tif\n",
      "./train//FERET-031/07.tif\n",
      "./train//FERET-032/01.tif\n",
      "./train//FERET-032/02.tif\n",
      "./train//FERET-032/03.tif\n",
      "./train//FERET-032/04.tif\n",
      "./train//FERET-032/05.tif\n",
      "./train//FERET-032/06.tif\n",
      "./train//FERET-032/07.tif\n",
      "./train//FERET-033/01.tif\n",
      "./train//FERET-033/02.tif\n",
      "./train//FERET-033/03.tif\n",
      "./train//FERET-033/04.tif\n",
      "./train//FERET-033/05.tif\n",
      "./train//FERET-033/06.tif\n",
      "./train//FERET-033/07.tif\n",
      "./train//FERET-034/01.tif\n",
      "./train//FERET-034/02.tif\n",
      "./train//FERET-034/03.tif\n",
      "./train//FERET-034/04.tif\n",
      "./train//FERET-034/05.tif\n",
      "./train//FERET-034/06.tif\n",
      "./train//FERET-034/07.tif\n",
      "./train//FERET-035/01.tif\n",
      "./train//FERET-035/02.tif\n",
      "./train//FERET-035/03.tif\n",
      "./train//FERET-035/04.tif\n",
      "./train//FERET-035/05.tif\n",
      "./train//FERET-035/06.tif\n",
      "./train//FERET-035/07.tif\n",
      "./train//FERET-036/01.tif\n",
      "./train//FERET-036/02.tif\n",
      "./train//FERET-036/03.tif\n",
      "./train//FERET-036/04.tif\n",
      "./train//FERET-036/05.tif\n",
      "./train//FERET-036/06.tif\n",
      "./train//FERET-036/07.tif\n",
      "./train//FERET-037/01.tif\n",
      "./train//FERET-037/02.tif\n",
      "./train//FERET-037/03.tif\n",
      "./train//FERET-037/04.tif\n",
      "./train//FERET-037/05.tif\n",
      "./train//FERET-037/06.tif\n",
      "./train//FERET-037/07.tif\n",
      "./train//FERET-038/01.tif\n",
      "./train//FERET-038/02.tif\n",
      "./train//FERET-038/03.tif\n",
      "./train//FERET-038/04.tif\n",
      "./train//FERET-038/05.tif\n",
      "./train//FERET-038/06.tif\n",
      "./train//FERET-038/07.tif\n",
      "./train//FERET-039/01.tif\n",
      "./train//FERET-039/02.tif\n",
      "./train//FERET-039/03.tif\n",
      "./train//FERET-039/04.tif\n",
      "./train//FERET-039/05.tif\n",
      "./train//FERET-039/06.tif\n",
      "./train//FERET-039/07.tif\n",
      "./train//FERET-040/01.tif\n",
      "./train//FERET-040/02.tif\n",
      "./train//FERET-040/03.tif\n",
      "./train//FERET-040/04.tif\n",
      "./train//FERET-040/05.tif\n",
      "./train//FERET-040/06.tif\n",
      "./train//FERET-040/07.tif\n",
      "./train//FERET-041/01.tif\n",
      "./train//FERET-041/02.tif\n",
      "./train//FERET-041/03.tif\n",
      "./train//FERET-041/04.tif\n",
      "./train//FERET-041/05.tif\n",
      "./train//FERET-041/06.tif\n",
      "./train//FERET-041/07.tif\n",
      "./train//FERET-042/01.tif\n",
      "./train//FERET-042/02.tif\n",
      "./train//FERET-042/03.tif\n",
      "./train//FERET-042/04.tif\n",
      "./train//FERET-042/05.tif\n",
      "./train//FERET-042/06.tif\n",
      "./train//FERET-042/07.tif\n",
      "./train//FERET-043/01.tif\n",
      "./train//FERET-043/02.tif\n",
      "./train//FERET-043/03.tif\n",
      "./train//FERET-043/04.tif\n",
      "./train//FERET-043/05.tif\n",
      "./train//FERET-043/06.tif\n",
      "./train//FERET-043/07.tif\n",
      "./train//FERET-044/01.tif\n",
      "./train//FERET-044/02.tif\n",
      "./train//FERET-044/03.tif\n",
      "./train//FERET-044/04.tif\n",
      "./train//FERET-044/05.tif\n",
      "./train//FERET-044/06.tif\n",
      "./train//FERET-044/07.tif\n",
      "./train//FERET-045/01.tif\n",
      "./train//FERET-045/02.tif\n",
      "./train//FERET-045/03.tif\n",
      "./train//FERET-045/04.tif\n",
      "./train//FERET-045/05.tif\n",
      "./train//FERET-045/06.tif\n",
      "./train//FERET-045/07.tif\n",
      "./train//FERET-046/01.tif\n",
      "./train//FERET-046/02.tif\n",
      "./train//FERET-046/03.tif\n",
      "./train//FERET-046/04.tif\n",
      "./train//FERET-046/05.tif\n",
      "./train//FERET-046/06.tif\n",
      "./train//FERET-046/07.tif\n",
      "./train//FERET-047/01.tif\n",
      "./train//FERET-047/02.tif\n",
      "./train//FERET-047/03.tif\n",
      "./train//FERET-047/04.tif\n",
      "./train//FERET-047/05.tif\n",
      "./train//FERET-047/06.tif\n",
      "./train//FERET-047/07.tif\n",
      "./train//FERET-048/01.tif\n",
      "./train//FERET-048/02.tif\n",
      "./train//FERET-048/03.tif\n",
      "./train//FERET-048/04.tif\n",
      "./train//FERET-048/05.tif\n",
      "./train//FERET-048/06.tif\n",
      "./train//FERET-048/07.tif\n",
      "./train//FERET-049/01.tif\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./train//FERET-049/02.tif\n",
      "./train//FERET-049/03.tif\n",
      "./train//FERET-049/04.tif\n",
      "./train//FERET-049/05.tif\n",
      "./train//FERET-049/06.tif\n",
      "./train//FERET-049/07.tif\n",
      "./train//FERET-050/01.tif\n",
      "./train//FERET-050/02.tif\n",
      "./train//FERET-050/03.tif\n",
      "./train//FERET-050/04.tif\n",
      "./train//FERET-050/05.tif\n",
      "./train//FERET-050/06.tif\n",
      "./train//FERET-050/07.tif\n",
      "./train//FERET-051/01.tif\n",
      "./train//FERET-051/02.tif\n",
      "./train//FERET-051/03.tif\n",
      "./train//FERET-051/04.tif\n",
      "./train//FERET-051/05.tif\n",
      "./train//FERET-051/06.tif\n",
      "./train//FERET-051/07.tif\n",
      "./train//FERET-052/01.tif\n",
      "./train//FERET-052/02.tif\n",
      "./train//FERET-052/03.tif\n",
      "./train//FERET-052/04.tif\n",
      "./train//FERET-052/05.tif\n",
      "./train//FERET-052/06.tif\n",
      "./train//FERET-052/07.tif\n",
      "./train//FERET-053/01.tif\n",
      "./train//FERET-053/02.tif\n",
      "./train//FERET-053/03.tif\n",
      "./train//FERET-053/04.tif\n",
      "./train//FERET-053/05.tif\n",
      "./train//FERET-053/06.tif\n",
      "./train//FERET-053/07.tif\n",
      "./train//FERET-054/01.tif\n",
      "./train//FERET-054/02.tif\n",
      "./train//FERET-054/03.tif\n",
      "./train//FERET-054/04.tif\n",
      "./train//FERET-054/05.tif\n",
      "./train//FERET-054/06.tif\n",
      "./train//FERET-054/07.tif\n",
      "./train//FERET-055/01.tif\n",
      "./train//FERET-055/02.tif\n",
      "./train//FERET-055/03.tif\n",
      "./train//FERET-055/04.tif\n",
      "./train//FERET-055/05.tif\n",
      "./train//FERET-055/06.tif\n",
      "./train//FERET-055/07.tif\n",
      "./train//FERET-056/01.tif\n",
      "./train//FERET-056/02.tif\n",
      "./train//FERET-056/03.tif\n",
      "./train//FERET-056/04.tif\n",
      "./train//FERET-056/05.tif\n",
      "./train//FERET-056/06.tif\n",
      "./train//FERET-056/07.tif\n",
      "./train//FERET-057/01.tif\n",
      "./train//FERET-057/02.tif\n",
      "./train//FERET-057/03.tif\n",
      "./train//FERET-057/04.tif\n",
      "./train//FERET-057/05.tif\n",
      "./train//FERET-057/06.tif\n",
      "./train//FERET-057/07.tif\n",
      "./train//FERET-058/01.tif\n",
      "./train//FERET-058/02.tif\n",
      "./train//FERET-058/03.tif\n",
      "./train//FERET-058/04.tif\n",
      "./train//FERET-058/05.tif\n",
      "./train//FERET-058/06.tif\n",
      "./train//FERET-058/07.tif\n",
      "./train//FERET-059/01.tif\n",
      "./train//FERET-059/02.tif\n",
      "./train//FERET-059/03.tif\n",
      "./train//FERET-059/04.tif\n",
      "./train//FERET-059/05.tif\n",
      "./train//FERET-059/06.tif\n",
      "./train//FERET-059/07.tif\n",
      "./train//FERET-060/01.tif\n",
      "./train//FERET-060/02.tif\n",
      "./train//FERET-060/03.tif\n",
      "./train//FERET-060/04.tif\n",
      "./train//FERET-060/05.tif\n",
      "./train//FERET-060/06.tif\n",
      "./train//FERET-060/07.tif\n",
      "./train//FERET-061/01.tif\n",
      "./train//FERET-061/02.tif\n",
      "./train//FERET-061/03.tif\n",
      "./train//FERET-061/04.tif\n",
      "./train//FERET-061/05.tif\n",
      "./train//FERET-061/06.tif\n",
      "./train//FERET-061/07.tif\n",
      "./train//FERET-062/01.tif\n",
      "./train//FERET-062/02.tif\n",
      "./train//FERET-062/03.tif\n",
      "./train//FERET-062/04.tif\n",
      "./train//FERET-062/05.tif\n",
      "./train//FERET-062/06.tif\n",
      "./train//FERET-062/07.tif\n",
      "./train//FERET-063/01.tif\n",
      "./train//FERET-063/02.tif\n",
      "./train//FERET-063/03.tif\n",
      "./train//FERET-063/04.tif\n",
      "./train//FERET-063/05.tif\n",
      "./train//FERET-063/06.tif\n",
      "./train//FERET-063/07.tif\n",
      "./train//FERET-064/01.tif\n",
      "./train//FERET-064/02.tif\n",
      "./train//FERET-064/03.tif\n",
      "./train//FERET-064/04.tif\n",
      "./train//FERET-064/05.tif\n",
      "./train//FERET-064/06.tif\n",
      "./train//FERET-064/07.tif\n",
      "./train//FERET-065/01.tif\n",
      "./train//FERET-065/02.tif\n",
      "./train//FERET-065/03.tif\n",
      "./train//FERET-065/04.tif\n",
      "./train//FERET-065/05.tif\n",
      "./train//FERET-065/06.tif\n",
      "./train//FERET-065/07.tif\n",
      "./train//FERET-066/01.tif\n",
      "./train//FERET-066/02.tif\n",
      "./train//FERET-066/03.tif\n",
      "./train//FERET-066/04.tif\n",
      "./train//FERET-066/05.tif\n",
      "./train//FERET-066/06.tif\n",
      "./train//FERET-066/07.tif\n",
      "./train//FERET-067/01.tif\n",
      "./train//FERET-067/02.tif\n",
      "./train//FERET-067/03.tif\n",
      "./train//FERET-067/04.tif\n",
      "./train//FERET-067/05.tif\n",
      "./train//FERET-067/06.tif\n",
      "./train//FERET-067/07.tif\n",
      "./train//FERET-068/01.tif\n",
      "./train//FERET-068/02.tif\n",
      "./train//FERET-068/03.tif\n",
      "./train//FERET-068/04.tif\n",
      "./train//FERET-068/05.tif\n",
      "./train//FERET-068/06.tif\n",
      "./train//FERET-068/07.tif\n",
      "./train//FERET-069/01.tif\n",
      "./train//FERET-069/02.tif\n",
      "./train//FERET-069/03.tif\n",
      "./train//FERET-069/04.tif\n",
      "./train//FERET-069/05.tif\n",
      "./train//FERET-069/06.tif\n",
      "./train//FERET-069/07.tif\n",
      "./train//FERET-070/01.tif\n",
      "./train//FERET-070/02.tif\n",
      "./train//FERET-070/03.tif\n",
      "./train//FERET-070/04.tif\n",
      "./train//FERET-070/05.tif\n",
      "./train//FERET-070/06.tif\n",
      "./train//FERET-070/07.tif\n",
      "./train//FERET-071/01.tif\n",
      "./train//FERET-071/02.tif\n",
      "./train//FERET-071/03.tif\n",
      "./train//FERET-071/04.tif\n",
      "./train//FERET-071/05.tif\n",
      "./train//FERET-071/06.tif\n",
      "./train//FERET-071/07.tif\n",
      "./train//FERET-072/01.tif\n",
      "./train//FERET-072/02.tif\n",
      "./train//FERET-072/03.tif\n",
      "./train//FERET-072/04.tif\n",
      "./train//FERET-072/05.tif\n",
      "./train//FERET-072/06.tif\n",
      "./train//FERET-072/07.tif\n",
      "./train//FERET-073/01.tif\n",
      "./train//FERET-073/02.tif\n",
      "./train//FERET-073/03.tif\n",
      "./train//FERET-073/04.tif\n",
      "./train//FERET-073/05.tif\n",
      "./train//FERET-073/06.tif\n",
      "./train//FERET-073/07.tif\n",
      "./train//FERET-074/01.tif\n",
      "./train//FERET-074/02.tif\n",
      "./train//FERET-074/03.tif\n",
      "./train//FERET-074/04.tif\n",
      "./train//FERET-074/05.tif\n",
      "./train//FERET-074/06.tif\n",
      "./train//FERET-074/07.tif\n",
      "./train//FERET-075/01.tif\n",
      "./train//FERET-075/02.tif\n",
      "./train//FERET-075/03.tif\n",
      "./train//FERET-075/04.tif\n",
      "./train//FERET-075/05.tif\n",
      "./train//FERET-075/06.tif\n",
      "./train//FERET-075/07.tif\n",
      "./train//FERET-076/01.tif\n",
      "./train//FERET-076/02.tif\n",
      "./train//FERET-076/03.tif\n",
      "./train//FERET-076/04.tif\n",
      "./train//FERET-076/05.tif\n",
      "./train//FERET-076/06.tif\n",
      "./train//FERET-076/07.tif\n",
      "./train//FERET-077/01.tif\n",
      "./train//FERET-077/02.tif\n",
      "./train//FERET-077/03.tif\n",
      "./train//FERET-077/04.tif\n",
      "./train//FERET-077/05.tif\n",
      "./train//FERET-077/06.tif\n",
      "./train//FERET-077/07.tif\n",
      "./train//FERET-078/01.tif\n",
      "./train//FERET-078/02.tif\n",
      "./train//FERET-078/03.tif\n",
      "./train//FERET-078/04.tif\n",
      "./train//FERET-078/05.tif\n",
      "./train//FERET-078/06.tif\n",
      "./train//FERET-078/07.tif\n",
      "./train//FERET-079/01.tif\n",
      "./train//FERET-079/02.tif\n",
      "./train//FERET-079/03.tif\n",
      "./train//FERET-079/04.tif\n",
      "./train//FERET-079/05.tif\n",
      "./train//FERET-079/06.tif\n",
      "./train//FERET-079/07.tif\n",
      "./train//FERET-080/01.tif\n",
      "./train//FERET-080/02.tif\n",
      "./train//FERET-080/03.tif\n",
      "./train//FERET-080/04.tif\n",
      "./train//FERET-080/05.tif\n",
      "./train//FERET-080/06.tif\n",
      "./train//FERET-080/07.tif\n",
      "./train//FERET-081/01.tif\n",
      "./train//FERET-081/02.tif\n",
      "./train//FERET-081/03.tif\n",
      "./train//FERET-081/04.tif\n",
      "./train//FERET-081/05.tif\n",
      "./train//FERET-081/06.tif\n",
      "./train//FERET-081/07.tif\n",
      "./train//FERET-082/01.tif\n",
      "./train//FERET-082/02.tif\n",
      "./train//FERET-082/03.tif\n",
      "./train//FERET-082/04.tif\n",
      "./train//FERET-082/05.tif\n",
      "./train//FERET-082/06.tif\n",
      "./train//FERET-082/07.tif\n",
      "./train//FERET-083/01.tif\n",
      "./train//FERET-083/02.tif\n",
      "./train//FERET-083/03.tif\n",
      "./train//FERET-083/04.tif\n",
      "./train//FERET-083/05.tif\n",
      "./train//FERET-083/06.tif\n",
      "./train//FERET-083/07.tif\n",
      "./train//FERET-084/01.tif\n",
      "./train//FERET-084/02.tif\n",
      "./train//FERET-084/03.tif\n",
      "./train//FERET-084/04.tif\n",
      "./train//FERET-084/05.tif\n",
      "./train//FERET-084/06.tif\n",
      "./train//FERET-084/07.tif\n",
      "./train//FERET-085/01.tif\n",
      "./train//FERET-085/02.tif\n",
      "./train//FERET-085/03.tif\n",
      "./train//FERET-085/04.tif\n",
      "./train//FERET-085/05.tif\n",
      "./train//FERET-085/06.tif\n",
      "./train//FERET-085/07.tif\n",
      "./train//FERET-086/01.tif\n",
      "./train//FERET-086/02.tif\n",
      "./train//FERET-086/03.tif\n",
      "./train//FERET-086/04.tif\n",
      "./train//FERET-086/05.tif\n",
      "./train//FERET-086/06.tif\n",
      "./train//FERET-086/07.tif\n",
      "./train//FERET-087/01.tif\n",
      "./train//FERET-087/02.tif\n",
      "./train//FERET-087/03.tif\n",
      "./train//FERET-087/04.tif\n",
      "./train//FERET-087/05.tif\n",
      "./train//FERET-087/06.tif\n",
      "./train//FERET-087/07.tif\n",
      "./train//FERET-088/01.tif\n",
      "./train//FERET-088/02.tif\n",
      "./train//FERET-088/03.tif\n",
      "./train//FERET-088/04.tif\n",
      "./train//FERET-088/05.tif\n",
      "./train//FERET-088/06.tif\n",
      "./train//FERET-088/07.tif\n",
      "./train//FERET-089/01.tif\n",
      "./train//FERET-089/02.tif\n",
      "./train//FERET-089/03.tif\n",
      "./train//FERET-089/04.tif\n",
      "./train//FERET-089/05.tif\n",
      "./train//FERET-089/06.tif\n",
      "./train//FERET-089/07.tif\n",
      "./train//FERET-090/01.tif\n",
      "./train//FERET-090/02.tif\n",
      "./train//FERET-090/03.tif\n",
      "./train//FERET-090/04.tif\n",
      "./train//FERET-090/05.tif\n",
      "./train//FERET-090/06.tif\n",
      "./train//FERET-090/07.tif\n",
      "./train//FERET-091/01.tif\n",
      "./train//FERET-091/02.tif\n",
      "./train//FERET-091/03.tif\n",
      "./train//FERET-091/04.tif\n",
      "./train//FERET-091/05.tif\n",
      "./train//FERET-091/06.tif\n",
      "./train//FERET-091/07.tif\n",
      "./train//FERET-092/01.tif\n",
      "./train//FERET-092/02.tif\n",
      "./train//FERET-092/03.tif\n",
      "./train//FERET-092/04.tif\n",
      "./train//FERET-092/05.tif\n",
      "./train//FERET-092/06.tif\n",
      "./train//FERET-092/07.tif\n",
      "./train//FERET-093/01.tif\n",
      "./train//FERET-093/02.tif\n",
      "./train//FERET-093/03.tif\n",
      "./train//FERET-093/04.tif\n",
      "./train//FERET-093/05.tif\n",
      "./train//FERET-093/06.tif\n",
      "./train//FERET-093/07.tif\n",
      "./train//FERET-094/01.tif\n",
      "./train//FERET-094/02.tif\n",
      "./train//FERET-094/03.tif\n",
      "./train//FERET-094/04.tif\n",
      "./train//FERET-094/05.tif\n",
      "./train//FERET-094/06.tif\n",
      "./train//FERET-094/07.tif\n",
      "./train//FERET-095/01.tif\n",
      "./train//FERET-095/02.tif\n",
      "./train//FERET-095/03.tif\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./train//FERET-095/04.tif\n",
      "./train//FERET-095/05.tif\n",
      "./train//FERET-095/06.tif\n",
      "./train//FERET-095/07.tif\n",
      "./train//FERET-096/01.tif\n",
      "./train//FERET-096/02.tif\n",
      "./train//FERET-096/03.tif\n",
      "./train//FERET-096/04.tif\n",
      "./train//FERET-096/05.tif\n",
      "./train//FERET-096/06.tif\n",
      "./train//FERET-096/07.tif\n",
      "./train//FERET-097/01.tif\n",
      "./train//FERET-097/02.tif\n",
      "./train//FERET-097/03.tif\n",
      "./train//FERET-097/04.tif\n",
      "./train//FERET-097/05.tif\n",
      "./train//FERET-097/06.tif\n",
      "./train//FERET-097/07.tif\n",
      "./train//FERET-098/01.tif\n",
      "./train//FERET-098/02.tif\n",
      "./train//FERET-098/03.tif\n",
      "./train//FERET-098/04.tif\n",
      "./train//FERET-098/05.tif\n",
      "./train//FERET-098/06.tif\n",
      "./train//FERET-098/07.tif\n",
      "./train//FERET-099/01.tif\n",
      "./train//FERET-099/02.tif\n",
      "./train//FERET-099/03.tif\n",
      "./train//FERET-099/04.tif\n",
      "./train//FERET-099/05.tif\n",
      "./train//FERET-099/06.tif\n",
      "./train//FERET-099/07.tif\n",
      "./train//FERET-100/01.tif\n",
      "./train//FERET-100/02.tif\n",
      "./train//FERET-100/03.tif\n",
      "./train//FERET-100/04.tif\n",
      "./train//FERET-100/05.tif\n",
      "./train//FERET-100/06.tif\n",
      "./train//FERET-100/07.tif\n",
      "./train//FERET-101/01.tif\n",
      "./train//FERET-101/02.tif\n",
      "./train//FERET-101/03.tif\n",
      "./train//FERET-101/04.tif\n",
      "./train//FERET-101/05.tif\n",
      "./train//FERET-101/06.tif\n",
      "./train//FERET-101/07.tif\n",
      "./train//FERET-102/01.tif\n",
      "./train//FERET-102/02.tif\n",
      "./train//FERET-102/03.tif\n",
      "./train//FERET-102/04.tif\n",
      "./train//FERET-102/05.tif\n",
      "./train//FERET-102/06.tif\n",
      "./train//FERET-102/07.tif\n",
      "./train//FERET-103/01.tif\n",
      "./train//FERET-103/02.tif\n",
      "./train//FERET-103/03.tif\n",
      "./train//FERET-103/04.tif\n",
      "./train//FERET-103/05.tif\n",
      "./train//FERET-103/06.tif\n",
      "./train//FERET-103/07.tif\n",
      "./train//FERET-104/01.tif\n",
      "./train//FERET-104/02.tif\n",
      "./train//FERET-104/03.tif\n",
      "./train//FERET-104/04.tif\n",
      "./train//FERET-104/05.tif\n",
      "./train//FERET-104/06.tif\n",
      "./train//FERET-104/07.tif\n",
      "./train//FERET-105/01.tif\n",
      "./train//FERET-105/02.tif\n",
      "./train//FERET-105/03.tif\n",
      "./train//FERET-105/04.tif\n",
      "./train//FERET-105/05.tif\n",
      "./train//FERET-105/06.tif\n",
      "./train//FERET-105/07.tif\n",
      "./train//FERET-106/01.tif\n",
      "./train//FERET-106/02.tif\n",
      "./train//FERET-106/03.tif\n",
      "./train//FERET-106/04.tif\n",
      "./train//FERET-106/05.tif\n",
      "./train//FERET-106/06.tif\n",
      "./train//FERET-106/07.tif\n",
      "./train//FERET-107/01.tif\n",
      "./train//FERET-107/02.tif\n",
      "./train//FERET-107/03.tif\n",
      "./train//FERET-107/04.tif\n",
      "./train//FERET-107/05.tif\n",
      "./train//FERET-107/06.tif\n",
      "./train//FERET-107/07.tif\n",
      "./train//FERET-108/01.tif\n",
      "./train//FERET-108/02.tif\n",
      "./train//FERET-108/03.tif\n",
      "./train//FERET-108/04.tif\n",
      "./train//FERET-108/05.tif\n",
      "./train//FERET-108/06.tif\n",
      "./train//FERET-108/07.tif\n",
      "./train//FERET-109/01.tif\n",
      "./train//FERET-109/02.tif\n",
      "./train//FERET-109/03.tif\n",
      "./train//FERET-109/04.tif\n",
      "./train//FERET-109/05.tif\n",
      "./train//FERET-109/06.tif\n",
      "./train//FERET-109/07.tif\n",
      "./train//FERET-110/01.tif\n",
      "./train//FERET-110/02.tif\n",
      "./train//FERET-110/03.tif\n",
      "./train//FERET-110/04.tif\n",
      "./train//FERET-110/05.tif\n",
      "./train//FERET-110/06.tif\n",
      "./train//FERET-110/07.tif\n",
      "./train//FERET-111/01.tif\n",
      "./train//FERET-111/02.tif\n",
      "./train//FERET-111/03.tif\n",
      "./train//FERET-111/04.tif\n",
      "./train//FERET-111/05.tif\n",
      "./train//FERET-111/06.tif\n",
      "./train//FERET-111/07.tif\n",
      "./train//FERET-112/01.tif\n",
      "./train//FERET-112/02.tif\n",
      "./train//FERET-112/03.tif\n",
      "./train//FERET-112/04.tif\n",
      "./train//FERET-112/05.tif\n",
      "./train//FERET-112/06.tif\n",
      "./train//FERET-112/07.tif\n",
      "./train//FERET-113/01.tif\n",
      "./train//FERET-113/02.tif\n",
      "./train//FERET-113/03.tif\n",
      "./train//FERET-113/04.tif\n",
      "./train//FERET-113/05.tif\n",
      "./train//FERET-113/06.tif\n",
      "./train//FERET-113/07.tif\n",
      "./train//FERET-114/01.tif\n",
      "./train//FERET-114/02.tif\n",
      "./train//FERET-114/03.tif\n",
      "./train//FERET-114/04.tif\n",
      "./train//FERET-114/05.tif\n",
      "./train//FERET-114/06.tif\n",
      "./train//FERET-114/07.tif\n",
      "./train//FERET-115/01.tif\n",
      "./train//FERET-115/02.tif\n",
      "./train//FERET-115/03.tif\n",
      "./train//FERET-115/04.tif\n",
      "./train//FERET-115/05.tif\n",
      "./train//FERET-115/06.tif\n",
      "./train//FERET-115/07.tif\n",
      "./train//FERET-116/01.tif\n",
      "./train//FERET-116/02.tif\n",
      "./train//FERET-116/03.tif\n",
      "./train//FERET-116/04.tif\n",
      "./train//FERET-116/05.tif\n",
      "./train//FERET-116/06.tif\n",
      "./train//FERET-116/07.tif\n",
      "./train//FERET-117/01.tif\n",
      "./train//FERET-117/02.tif\n",
      "./train//FERET-117/03.tif\n",
      "./train//FERET-117/04.tif\n",
      "./train//FERET-117/05.tif\n",
      "./train//FERET-117/06.tif\n",
      "./train//FERET-117/07.tif\n",
      "./train//FERET-118/01.tif\n",
      "./train//FERET-118/02.tif\n",
      "./train//FERET-118/03.tif\n",
      "./train//FERET-118/04.tif\n",
      "./train//FERET-118/05.tif\n",
      "./train//FERET-118/06.tif\n",
      "./train//FERET-118/07.tif\n",
      "./train//FERET-119/01.tif\n",
      "./train//FERET-119/02.tif\n",
      "./train//FERET-119/03.tif\n",
      "./train//FERET-119/04.tif\n",
      "./train//FERET-119/05.tif\n",
      "./train//FERET-119/06.tif\n",
      "./train//FERET-119/07.tif\n",
      "./train//FERET-120/01.tif\n",
      "./train//FERET-120/02.tif\n",
      "./train//FERET-120/03.tif\n",
      "./train//FERET-120/04.tif\n",
      "./train//FERET-120/05.tif\n",
      "./train//FERET-120/06.tif\n",
      "./train//FERET-120/07.tif\n",
      "./train//FERET-121/01.tif\n",
      "./train//FERET-121/02.tif\n",
      "./train//FERET-121/03.tif\n",
      "./train//FERET-121/04.tif\n",
      "./train//FERET-121/05.tif\n",
      "./train//FERET-121/06.tif\n",
      "./train//FERET-121/07.tif\n",
      "./train//FERET-122/01.tif\n",
      "./train//FERET-122/02.tif\n",
      "./train//FERET-122/03.tif\n",
      "./train//FERET-122/04.tif\n",
      "./train//FERET-122/05.tif\n",
      "./train//FERET-122/06.tif\n",
      "./train//FERET-122/07.tif\n",
      "./train//FERET-123/01.tif\n",
      "./train//FERET-123/02.tif\n",
      "./train//FERET-123/03.tif\n",
      "./train//FERET-123/04.tif\n",
      "./train//FERET-123/05.tif\n",
      "./train//FERET-123/06.tif\n",
      "./train//FERET-123/07.tif\n",
      "./train//FERET-124/01.tif\n",
      "./train//FERET-124/02.tif\n",
      "./train//FERET-124/03.tif\n",
      "./train//FERET-124/04.tif\n",
      "./train//FERET-124/05.tif\n",
      "./train//FERET-124/06.tif\n",
      "./train//FERET-124/07.tif\n",
      "./train//FERET-125/01.tif\n",
      "./train//FERET-125/02.tif\n",
      "./train//FERET-125/03.tif\n",
      "./train//FERET-125/04.tif\n",
      "./train//FERET-125/05.tif\n",
      "./train//FERET-125/06.tif\n",
      "./train//FERET-125/07.tif\n",
      "./train//FERET-126/01.tif\n",
      "./train//FERET-126/02.tif\n",
      "./train//FERET-126/03.tif\n",
      "./train//FERET-126/04.tif\n",
      "./train//FERET-126/05.tif\n",
      "./train//FERET-126/06.tif\n",
      "./train//FERET-126/07.tif\n",
      "./train//FERET-127/01.tif\n",
      "./train//FERET-127/02.tif\n",
      "./train//FERET-127/03.tif\n",
      "./train//FERET-127/04.tif\n",
      "./train//FERET-127/05.tif\n",
      "./train//FERET-127/06.tif\n",
      "./train//FERET-127/07.tif\n",
      "./train//FERET-128/01.tif\n",
      "./train//FERET-128/02.tif\n",
      "./train//FERET-128/03.tif\n",
      "./train//FERET-128/04.tif\n",
      "./train//FERET-128/05.tif\n",
      "./train//FERET-128/06.tif\n",
      "./train//FERET-128/07.tif\n",
      "./train//FERET-129/01.tif\n",
      "./train//FERET-129/02.tif\n",
      "./train//FERET-129/03.tif\n",
      "./train//FERET-129/04.tif\n",
      "./train//FERET-129/05.tif\n",
      "./train//FERET-129/06.tif\n",
      "./train//FERET-129/07.tif\n",
      "./train//FERET-130/01.tif\n",
      "./train//FERET-130/02.tif\n",
      "./train//FERET-130/03.tif\n",
      "./train//FERET-130/04.tif\n",
      "./train//FERET-130/05.tif\n",
      "./train//FERET-130/06.tif\n",
      "./train//FERET-130/07.tif\n",
      "./train//FERET-131/01.tif\n",
      "./train//FERET-131/02.tif\n",
      "./train//FERET-131/03.tif\n",
      "./train//FERET-131/04.tif\n",
      "./train//FERET-131/05.tif\n",
      "./train//FERET-131/06.tif\n",
      "./train//FERET-131/07.tif\n",
      "./train//FERET-132/01.tif\n",
      "./train//FERET-132/02.tif\n",
      "./train//FERET-132/03.tif\n",
      "./train//FERET-132/04.tif\n",
      "./train//FERET-132/05.tif\n",
      "./train//FERET-132/06.tif\n",
      "./train//FERET-132/07.tif\n",
      "./train//FERET-133/01.tif\n",
      "./train//FERET-133/02.tif\n",
      "./train//FERET-133/03.tif\n",
      "./train//FERET-133/04.tif\n",
      "./train//FERET-133/05.tif\n",
      "./train//FERET-133/06.tif\n",
      "./train//FERET-133/07.tif\n",
      "./train//FERET-134/01.tif\n",
      "./train//FERET-134/02.tif\n",
      "./train//FERET-134/03.tif\n",
      "./train//FERET-134/04.tif\n",
      "./train//FERET-134/05.tif\n",
      "./train//FERET-134/06.tif\n",
      "./train//FERET-134/07.tif\n",
      "./train//FERET-135/01.tif\n",
      "./train//FERET-135/02.tif\n",
      "./train//FERET-135/03.tif\n",
      "./train//FERET-135/04.tif\n",
      "./train//FERET-135/05.tif\n",
      "./train//FERET-135/06.tif\n",
      "./train//FERET-135/07.tif\n",
      "./train//FERET-136/01.tif\n",
      "./train//FERET-136/02.tif\n",
      "./train//FERET-136/03.tif\n",
      "./train//FERET-136/04.tif\n",
      "./train//FERET-136/05.tif\n",
      "./train//FERET-136/06.tif\n",
      "./train//FERET-136/07.tif\n",
      "./train//FERET-137/01.tif\n",
      "./train//FERET-137/02.tif\n",
      "./train//FERET-137/03.tif\n",
      "./train//FERET-137/04.tif\n",
      "./train//FERET-137/05.tif\n",
      "./train//FERET-137/06.tif\n",
      "./train//FERET-137/07.tif\n",
      "./train//FERET-138/01.tif\n",
      "./train//FERET-138/02.tif\n",
      "./train//FERET-138/03.tif\n",
      "./train//FERET-138/04.tif\n",
      "./train//FERET-138/05.tif\n",
      "./train//FERET-138/06.tif\n",
      "./train//FERET-138/07.tif\n",
      "./train//FERET-139/01.tif\n",
      "./train//FERET-139/02.tif\n",
      "./train//FERET-139/03.tif\n",
      "./train//FERET-139/04.tif\n",
      "./train//FERET-139/05.tif\n",
      "./train//FERET-139/06.tif\n",
      "./train//FERET-139/07.tif\n",
      "./train//FERET-140/01.tif\n",
      "./train//FERET-140/02.tif\n",
      "./train//FERET-140/03.tif\n",
      "./train//FERET-140/04.tif\n",
      "./train//FERET-140/05.tif\n",
      "./train//FERET-140/06.tif\n",
      "./train//FERET-140/07.tif\n",
      "./train//FERET-141/01.tif\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./train//FERET-141/02.tif\n",
      "./train//FERET-141/03.tif\n",
      "./train//FERET-141/04.tif\n",
      "./train//FERET-141/05.tif\n",
      "./train//FERET-141/06.tif\n",
      "./train//FERET-141/07.tif\n",
      "./train//FERET-142/01.tif\n",
      "./train//FERET-142/02.tif\n",
      "./train//FERET-142/03.tif\n",
      "./train//FERET-142/04.tif\n",
      "./train//FERET-142/05.tif\n",
      "./train//FERET-142/06.tif\n",
      "./train//FERET-142/07.tif\n",
      "./train//FERET-143/01.tif\n",
      "./train//FERET-143/02.tif\n",
      "./train//FERET-143/03.tif\n",
      "./train//FERET-143/04.tif\n",
      "./train//FERET-143/05.tif\n",
      "./train//FERET-143/06.tif\n",
      "./train//FERET-143/07.tif\n",
      "./train//FERET-144/01.tif\n",
      "./train//FERET-144/02.tif\n",
      "./train//FERET-144/03.tif\n",
      "./train//FERET-144/04.tif\n",
      "./train//FERET-144/05.tif\n",
      "./train//FERET-144/06.tif\n",
      "./train//FERET-144/07.tif\n",
      "./train//FERET-145/01.tif\n",
      "./train//FERET-145/02.tif\n",
      "./train//FERET-145/03.tif\n",
      "./train//FERET-145/04.tif\n",
      "./train//FERET-145/05.tif\n",
      "./train//FERET-145/06.tif\n",
      "./train//FERET-145/07.tif\n",
      "./train//FERET-146/01.tif\n",
      "./train//FERET-146/02.tif\n",
      "./train//FERET-146/03.tif\n",
      "./train//FERET-146/04.tif\n",
      "./train//FERET-146/05.tif\n",
      "./train//FERET-146/06.tif\n",
      "./train//FERET-146/07.tif\n",
      "./train//FERET-147/01.tif\n",
      "./train//FERET-147/02.tif\n",
      "./train//FERET-147/03.tif\n",
      "./train//FERET-147/04.tif\n",
      "./train//FERET-147/05.tif\n",
      "./train//FERET-147/06.tif\n",
      "./train//FERET-147/07.tif\n",
      "./train//FERET-148/01.tif\n",
      "./train//FERET-148/02.tif\n",
      "./train//FERET-148/03.tif\n",
      "./train//FERET-148/04.tif\n",
      "./train//FERET-148/05.tif\n",
      "./train//FERET-148/06.tif\n",
      "./train//FERET-148/07.tif\n",
      "./train//FERET-149/01.tif\n",
      "./train//FERET-149/02.tif\n",
      "./train//FERET-149/03.tif\n",
      "./train//FERET-149/04.tif\n",
      "./train//FERET-149/05.tif\n",
      "./train//FERET-149/06.tif\n",
      "./train//FERET-149/07.tif\n",
      "./train//FERET-150/01.tif\n",
      "./train//FERET-150/02.tif\n",
      "./train//FERET-150/03.tif\n",
      "./train//FERET-150/04.tif\n",
      "./train//FERET-150/05.tif\n",
      "./train//FERET-150/06.tif\n",
      "./train//FERET-150/07.tif\n",
      "./train//FERET-151/01.tif\n",
      "./train//FERET-151/02.tif\n",
      "./train//FERET-151/03.tif\n",
      "./train//FERET-151/04.tif\n",
      "./train//FERET-151/05.tif\n",
      "./train//FERET-151/06.tif\n",
      "./train//FERET-151/07.tif\n",
      "./train//FERET-152/01.tif\n",
      "./train//FERET-152/02.tif\n",
      "./train//FERET-152/03.tif\n",
      "./train//FERET-152/04.tif\n",
      "./train//FERET-152/05.tif\n",
      "./train//FERET-152/06.tif\n",
      "./train//FERET-152/07.tif\n",
      "./train//FERET-153/01.tif\n",
      "./train//FERET-153/02.tif\n",
      "./train//FERET-153/03.tif\n",
      "./train//FERET-153/04.tif\n",
      "./train//FERET-153/05.tif\n",
      "./train//FERET-153/06.tif\n",
      "./train//FERET-153/07.tif\n",
      "./train//FERET-154/01.tif\n",
      "./train//FERET-154/02.tif\n",
      "./train//FERET-154/03.tif\n",
      "./train//FERET-154/04.tif\n",
      "./train//FERET-154/05.tif\n",
      "./train//FERET-154/06.tif\n",
      "./train//FERET-154/07.tif\n",
      "./train//FERET-155/01.tif\n",
      "./train//FERET-155/02.tif\n",
      "./train//FERET-155/03.tif\n",
      "./train//FERET-155/04.tif\n",
      "./train//FERET-155/05.tif\n",
      "./train//FERET-155/06.tif\n",
      "./train//FERET-155/07.tif\n",
      "./train//FERET-156/01.tif\n",
      "./train//FERET-156/02.tif\n",
      "./train//FERET-156/03.tif\n",
      "./train//FERET-156/04.tif\n",
      "./train//FERET-156/05.tif\n",
      "./train//FERET-156/06.tif\n",
      "./train//FERET-156/07.tif\n",
      "./train//FERET-157/01.tif\n",
      "./train//FERET-157/02.tif\n",
      "./train//FERET-157/03.tif\n",
      "./train//FERET-157/04.tif\n",
      "./train//FERET-157/05.tif\n",
      "./train//FERET-157/06.tif\n",
      "./train//FERET-157/07.tif\n",
      "./train//FERET-158/01.tif\n",
      "./train//FERET-158/02.tif\n",
      "./train//FERET-158/03.tif\n",
      "./train//FERET-158/04.tif\n",
      "./train//FERET-158/05.tif\n",
      "./train//FERET-158/06.tif\n",
      "./train//FERET-158/07.tif\n",
      "./train//FERET-159/01.tif\n",
      "./train//FERET-159/02.tif\n",
      "./train//FERET-159/03.tif\n",
      "./train//FERET-159/04.tif\n",
      "./train//FERET-159/05.tif\n",
      "./train//FERET-159/06.tif\n",
      "./train//FERET-159/07.tif\n",
      "./train//FERET-160/01.tif\n",
      "./train//FERET-160/02.tif\n",
      "./train//FERET-160/03.tif\n",
      "./train//FERET-160/04.tif\n",
      "./train//FERET-160/05.tif\n",
      "./train//FERET-160/06.tif\n",
      "./train//FERET-160/07.tif\n",
      "./train//FERET-161/01.tif\n",
      "./train//FERET-161/02.tif\n",
      "./train//FERET-161/03.tif\n",
      "./train//FERET-161/04.tif\n",
      "./train//FERET-161/05.tif\n",
      "./train//FERET-161/06.tif\n",
      "./train//FERET-161/07.tif\n",
      "./train//FERET-162/01.tif\n",
      "./train//FERET-162/02.tif\n",
      "./train//FERET-162/03.tif\n",
      "./train//FERET-162/04.tif\n",
      "./train//FERET-162/05.tif\n",
      "./train//FERET-162/06.tif\n",
      "./train//FERET-162/07.tif\n",
      "./train//FERET-163/01.tif\n",
      "./train//FERET-163/02.tif\n",
      "./train//FERET-163/03.tif\n",
      "./train//FERET-163/04.tif\n",
      "./train//FERET-163/05.tif\n",
      "./train//FERET-163/06.tif\n",
      "./train//FERET-163/07.tif\n",
      "./train//FERET-164/01.tif\n",
      "./train//FERET-164/02.tif\n",
      "./train//FERET-164/03.tif\n",
      "./train//FERET-164/04.tif\n",
      "./train//FERET-164/05.tif\n",
      "./train//FERET-164/06.tif\n",
      "./train//FERET-164/07.tif\n",
      "./train//FERET-165/01.tif\n",
      "./train//FERET-165/02.tif\n",
      "./train//FERET-165/03.tif\n",
      "./train//FERET-165/04.tif\n",
      "./train//FERET-165/05.tif\n",
      "./train//FERET-165/06.tif\n",
      "./train//FERET-165/07.tif\n",
      "./train//FERET-166/01.tif\n",
      "./train//FERET-166/02.tif\n",
      "./train//FERET-166/03.tif\n",
      "./train//FERET-166/04.tif\n",
      "./train//FERET-166/05.tif\n",
      "./train//FERET-166/06.tif\n",
      "./train//FERET-166/07.tif\n",
      "./train//FERET-167/01.tif\n",
      "./train//FERET-167/02.tif\n",
      "./train//FERET-167/03.tif\n",
      "./train//FERET-167/04.tif\n",
      "./train//FERET-167/05.tif\n",
      "./train//FERET-167/06.tif\n",
      "./train//FERET-167/07.tif\n",
      "./train//FERET-168/01.tif\n",
      "./train//FERET-168/02.tif\n",
      "./train//FERET-168/03.tif\n",
      "./train//FERET-168/04.tif\n",
      "./train//FERET-168/05.tif\n",
      "./train//FERET-168/06.tif\n",
      "./train//FERET-168/07.tif\n",
      "./train//FERET-169/01.tif\n",
      "./train//FERET-169/02.tif\n",
      "./train//FERET-169/03.tif\n",
      "./train//FERET-169/04.tif\n",
      "./train//FERET-169/05.tif\n",
      "./train//FERET-169/06.tif\n",
      "./train//FERET-169/07.tif\n",
      "./train//FERET-170/01.tif\n",
      "./train//FERET-170/02.tif\n",
      "./train//FERET-170/03.tif\n",
      "./train//FERET-170/04.tif\n",
      "./train//FERET-170/05.tif\n",
      "./train//FERET-170/06.tif\n",
      "./train//FERET-170/07.tif\n",
      "./train//FERET-171/01.tif\n",
      "./train//FERET-171/02.tif\n",
      "./train//FERET-171/03.tif\n",
      "./train//FERET-171/04.tif\n",
      "./train//FERET-171/05.tif\n",
      "./train//FERET-171/06.tif\n",
      "./train//FERET-171/07.tif\n",
      "./train//FERET-172/01.tif\n",
      "./train//FERET-172/02.tif\n",
      "./train//FERET-172/03.tif\n",
      "./train//FERET-172/04.tif\n",
      "./train//FERET-172/05.tif\n",
      "./train//FERET-172/06.tif\n",
      "./train//FERET-172/07.tif\n",
      "./train//FERET-173/01.tif\n",
      "./train//FERET-173/02.tif\n",
      "./train//FERET-173/03.tif\n",
      "./train//FERET-173/04.tif\n",
      "./train//FERET-173/05.tif\n",
      "./train//FERET-173/06.tif\n",
      "./train//FERET-173/07.tif\n",
      "./train//FERET-174/01.tif\n",
      "./train//FERET-174/02.tif\n",
      "./train//FERET-174/03.tif\n",
      "./train//FERET-174/04.tif\n",
      "./train//FERET-174/05.tif\n",
      "./train//FERET-174/06.tif\n",
      "./train//FERET-174/07.tif\n",
      "./train//FERET-175/01.tif\n",
      "./train//FERET-175/02.tif\n",
      "./train//FERET-175/03.tif\n",
      "./train//FERET-175/04.tif\n",
      "./train//FERET-175/05.tif\n",
      "./train//FERET-175/06.tif\n",
      "./train//FERET-175/07.tif\n",
      "./train//FERET-176/01.tif\n",
      "./train//FERET-176/02.tif\n",
      "./train//FERET-176/03.tif\n",
      "./train//FERET-176/04.tif\n",
      "./train//FERET-176/05.tif\n",
      "./train//FERET-176/06.tif\n",
      "./train//FERET-176/07.tif\n",
      "./train//FERET-177/01.tif\n",
      "./train//FERET-177/02.tif\n",
      "./train//FERET-177/03.tif\n",
      "./train//FERET-177/04.tif\n",
      "./train//FERET-177/05.tif\n",
      "./train//FERET-177/06.tif\n",
      "./train//FERET-177/07.tif\n",
      "./train//FERET-178/01.tif\n",
      "./train//FERET-178/02.tif\n",
      "./train//FERET-178/03.tif\n",
      "./train//FERET-178/04.tif\n",
      "./train//FERET-178/05.tif\n",
      "./train//FERET-178/06.tif\n",
      "./train//FERET-178/07.tif\n",
      "./train//FERET-179/01.tif\n",
      "./train//FERET-179/02.tif\n",
      "./train//FERET-179/03.tif\n",
      "./train//FERET-179/04.tif\n",
      "./train//FERET-179/05.tif\n",
      "./train//FERET-179/06.tif\n",
      "./train//FERET-179/07.tif\n",
      "./train//FERET-180/01.tif\n",
      "./train//FERET-180/02.tif\n",
      "./train//FERET-180/03.tif\n",
      "./train//FERET-180/04.tif\n",
      "./train//FERET-180/05.tif\n",
      "./train//FERET-180/06.tif\n",
      "./train//FERET-180/07.tif\n",
      "./train//FERET-181/01.tif\n",
      "./train//FERET-181/02.tif\n",
      "./train//FERET-181/03.tif\n",
      "./train//FERET-181/04.tif\n",
      "./train//FERET-181/05.tif\n",
      "./train//FERET-181/06.tif\n",
      "./train//FERET-181/07.tif\n",
      "./train//FERET-182/01.tif\n",
      "./train//FERET-182/02.tif\n",
      "./train//FERET-182/03.tif\n",
      "./train//FERET-182/04.tif\n",
      "./train//FERET-182/05.tif\n",
      "./train//FERET-182/06.tif\n",
      "./train//FERET-182/07.tif\n",
      "./train//FERET-183/01.tif\n",
      "./train//FERET-183/02.tif\n",
      "./train//FERET-183/03.tif\n",
      "./train//FERET-183/04.tif\n",
      "./train//FERET-183/05.tif\n",
      "./train//FERET-183/06.tif\n",
      "./train//FERET-183/07.tif\n",
      "./train//FERET-184/01.tif\n",
      "./train//FERET-184/02.tif\n",
      "./train//FERET-184/03.tif\n",
      "./train//FERET-184/04.tif\n",
      "./train//FERET-184/05.tif\n",
      "./train//FERET-184/06.tif\n",
      "./train//FERET-184/07.tif\n",
      "./train//FERET-185/01.tif\n",
      "./train//FERET-185/02.tif\n",
      "./train//FERET-185/03.tif\n",
      "./train//FERET-185/04.tif\n",
      "./train//FERET-185/05.tif\n",
      "./train//FERET-185/06.tif\n",
      "./train//FERET-185/07.tif\n",
      "./train//FERET-186/01.tif\n",
      "./train//FERET-186/02.tif\n",
      "./train//FERET-186/03.tif\n",
      "./train//FERET-186/04.tif\n",
      "./train//FERET-186/05.tif\n",
      "./train//FERET-186/06.tif\n",
      "./train//FERET-186/07.tif\n",
      "./train//FERET-187/01.tif\n",
      "./train//FERET-187/02.tif\n",
      "./train//FERET-187/03.tif\n",
      "./train//FERET-187/04.tif\n",
      "./train//FERET-187/05.tif\n",
      "./train//FERET-187/06.tif\n",
      "./train//FERET-187/07.tif\n",
      "./train//FERET-188/01.tif\n",
      "./train//FERET-188/02.tif\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./train//FERET-188/03.tif\n",
      "./train//FERET-188/04.tif\n",
      "./train//FERET-188/05.tif\n",
      "./train//FERET-188/06.tif\n",
      "./train//FERET-188/07.tif\n",
      "./train//FERET-189/01.tif\n",
      "./train//FERET-189/02.tif\n",
      "./train//FERET-189/03.tif\n",
      "./train//FERET-189/04.tif\n",
      "./train//FERET-189/05.tif\n",
      "./train//FERET-189/06.tif\n",
      "./train//FERET-189/07.tif\n",
      "./train//FERET-190/01.tif\n",
      "./train//FERET-190/02.tif\n",
      "./train//FERET-190/03.tif\n",
      "./train//FERET-190/04.tif\n",
      "./train//FERET-190/05.tif\n",
      "./train//FERET-190/06.tif\n",
      "./train//FERET-190/07.tif\n",
      "./train//FERET-191/01.tif\n",
      "./train//FERET-191/02.tif\n",
      "./train//FERET-191/03.tif\n",
      "./train//FERET-191/04.tif\n",
      "./train//FERET-191/05.tif\n",
      "./train//FERET-191/06.tif\n",
      "./train//FERET-191/07.tif\n",
      "./train//FERET-192/01.tif\n",
      "./train//FERET-192/02.tif\n",
      "./train//FERET-192/03.tif\n",
      "./train//FERET-192/04.tif\n",
      "./train//FERET-192/05.tif\n",
      "./train//FERET-192/06.tif\n",
      "./train//FERET-192/07.tif\n",
      "./train//FERET-193/01.tif\n",
      "./train//FERET-193/02.tif\n",
      "./train//FERET-193/03.tif\n",
      "./train//FERET-193/04.tif\n",
      "./train//FERET-193/05.tif\n",
      "./train//FERET-193/06.tif\n",
      "./train//FERET-193/07.tif\n",
      "./train//FERET-194/01.tif\n",
      "./train//FERET-194/02.tif\n",
      "./train//FERET-194/03.tif\n",
      "./train//FERET-194/04.tif\n",
      "./train//FERET-194/05.tif\n",
      "./train//FERET-194/06.tif\n",
      "./train//FERET-194/07.tif\n",
      "./train//FERET-195/01.tif\n",
      "./train//FERET-195/02.tif\n",
      "./train//FERET-195/03.tif\n",
      "./train//FERET-195/04.tif\n",
      "./train//FERET-195/05.tif\n",
      "./train//FERET-195/06.tif\n",
      "./train//FERET-195/07.tif\n",
      "./train//FERET-196/01.tif\n",
      "./train//FERET-196/02.tif\n",
      "./train//FERET-196/03.tif\n",
      "./train//FERET-196/04.tif\n",
      "./train//FERET-196/05.tif\n",
      "./train//FERET-196/06.tif\n",
      "./train//FERET-196/07.tif\n",
      "./train//FERET-197/01.tif\n",
      "./train//FERET-197/02.tif\n",
      "./train//FERET-197/03.tif\n",
      "./train//FERET-197/04.tif\n",
      "./train//FERET-197/05.tif\n",
      "./train//FERET-197/06.tif\n",
      "./train//FERET-197/07.tif\n",
      "./train//FERET-198/01.tif\n",
      "./train//FERET-198/02.tif\n",
      "./train//FERET-198/03.tif\n",
      "./train//FERET-198/04.tif\n",
      "./train//FERET-198/05.tif\n",
      "./train//FERET-198/06.tif\n",
      "./train//FERET-198/07.tif\n",
      "./train//FERET-199/01.tif\n",
      "./train//FERET-199/02.tif\n",
      "./train//FERET-199/03.tif\n",
      "./train//FERET-199/04.tif\n",
      "./train//FERET-199/05.tif\n",
      "./train//FERET-199/06.tif\n",
      "./train//FERET-199/07.tif\n",
      "./train//FERET-200/01.tif\n",
      "./train//FERET-200/02.tif\n",
      "./train//FERET-200/03.tif\n",
      "./train//FERET-200/04.tif\n",
      "./train//FERET-200/05.tif\n",
      "./train//FERET-200/06.tif\n",
      "./train//FERET-200/07.tif\n",
      "[[[[ 30  30  30]\n",
      "   [ 19  19  19]\n",
      "   [ 30  30  30]\n",
      "   ..., \n",
      "   [ 26  26  26]\n",
      "   [ 33  33  33]\n",
      "   [ 38  38  38]]\n",
      "\n",
      "  [[ 27  27  27]\n",
      "   [ 24  24  24]\n",
      "   [ 22  22  22]\n",
      "   ..., \n",
      "   [ 21  21  21]\n",
      "   [ 16  16  16]\n",
      "   [ 30  30  30]]\n",
      "\n",
      "  [[ 37  37  37]\n",
      "   [ 19  19  19]\n",
      "   [ 21  21  21]\n",
      "   ..., \n",
      "   [ 22  22  22]\n",
      "   [ 16  16  16]\n",
      "   [ 32  32  32]]\n",
      "\n",
      "  ..., \n",
      "  [[ 19  19  19]\n",
      "   [ 14  14  14]\n",
      "   [  9   9   9]\n",
      "   ..., \n",
      "   [ 22  22  22]\n",
      "   [ 26  26  26]\n",
      "   [ 29  29  29]]\n",
      "\n",
      "  [[ 14  14  14]\n",
      "   [ 16  16  16]\n",
      "   [ 10  10  10]\n",
      "   ..., \n",
      "   [ 25  25  25]\n",
      "   [ 24  24  24]\n",
      "   [ 26  26  26]]\n",
      "\n",
      "  [[ 17  17  17]\n",
      "   [ 12  12  12]\n",
      "   [  8   8   8]\n",
      "   ..., \n",
      "   [ 26  26  26]\n",
      "   [ 26  26  26]\n",
      "   [ 24  24  24]]]\n",
      "\n",
      "\n",
      " [[[ 42  42  42]\n",
      "   [ 40  40  40]\n",
      "   [ 42  42  42]\n",
      "   ..., \n",
      "   [118 118 118]\n",
      "   [119 119 119]\n",
      "   [118 118 118]]\n",
      "\n",
      "  [[ 40  40  40]\n",
      "   [ 38  38  38]\n",
      "   [ 56  56  56]\n",
      "   ..., \n",
      "   [120 120 120]\n",
      "   [118 118 118]\n",
      "   [120 120 120]]\n",
      "\n",
      "  [[ 54  54  54]\n",
      "   [ 46  46  46]\n",
      "   [ 56  56  56]\n",
      "   ..., \n",
      "   [118 118 118]\n",
      "   [120 120 120]\n",
      "   [119 119 119]]\n",
      "\n",
      "  ..., \n",
      "  [[117 117 117]\n",
      "   [134 134 134]\n",
      "   [133 133 133]\n",
      "   ..., \n",
      "   [ 20  20  20]\n",
      "   [ 23  23  23]\n",
      "   [ 25  25  25]]\n",
      "\n",
      "  [[ 74  74  74]\n",
      "   [121 121 121]\n",
      "   [134 134 134]\n",
      "   ..., \n",
      "   [ 21  21  21]\n",
      "   [ 22  22  22]\n",
      "   [ 24  24  24]]\n",
      "\n",
      "  [[135 135 135]\n",
      "   [ 80  80  80]\n",
      "   [128 128 128]\n",
      "   ..., \n",
      "   [ 23  23  23]\n",
      "   [ 22  22  22]\n",
      "   [ 26  26  26]]]\n",
      "\n",
      "\n",
      " [[[ 31  31  31]\n",
      "   [ 41  41  41]\n",
      "   [ 31  31  31]\n",
      "   ..., \n",
      "   [ 43  43  43]\n",
      "   [117 117 117]\n",
      "   [116 116 116]]\n",
      "\n",
      "  [[ 24  24  24]\n",
      "   [ 29  29  29]\n",
      "   [ 39  39  39]\n",
      "   ..., \n",
      "   [ 41  41  41]\n",
      "   [117 117 117]\n",
      "   [117 117 117]]\n",
      "\n",
      "  [[ 24  24  24]\n",
      "   [ 46  46  46]\n",
      "   [ 45  45  45]\n",
      "   ..., \n",
      "   [ 60  60  60]\n",
      "   [118 118 118]\n",
      "   [118 118 118]]\n",
      "\n",
      "  ..., \n",
      "  [[154 154 154]\n",
      "   [141 141 141]\n",
      "   [170 170 170]\n",
      "   ..., \n",
      "   [ 16  16  16]\n",
      "   [ 17  17  17]\n",
      "   [ 19  19  19]]\n",
      "\n",
      "  [[149 149 149]\n",
      "   [144 144 144]\n",
      "   [165 165 165]\n",
      "   ..., \n",
      "   [ 17  17  17]\n",
      "   [ 19  19  19]\n",
      "   [ 21  21  21]]\n",
      "\n",
      "  [[153 153 153]\n",
      "   [161 161 161]\n",
      "   [148 148 148]\n",
      "   ..., \n",
      "   [ 16  16  16]\n",
      "   [ 20  20  20]\n",
      "   [ 23  23  23]]]\n",
      "\n",
      "\n",
      " ..., \n",
      " [[[128 128 128]\n",
      "   [128 128 128]\n",
      "   [124 124 124]\n",
      "   ..., \n",
      "   [ 12  12  12]\n",
      "   [ 11  11  11]\n",
      "   [ 11  11  11]]\n",
      "\n",
      "  [[126 126 126]\n",
      "   [127 127 127]\n",
      "   [127 127 127]\n",
      "   ..., \n",
      "   [ 10  10  10]\n",
      "   [ 12  12  12]\n",
      "   [ 14  14  14]]\n",
      "\n",
      "  [[127 127 127]\n",
      "   [126 126 126]\n",
      "   [129 129 129]\n",
      "   ..., \n",
      "   [ 13  13  13]\n",
      "   [ 13  13  13]\n",
      "   [ 12  12  12]]\n",
      "\n",
      "  ..., \n",
      "  [[184 184 184]\n",
      "   [175 175 175]\n",
      "   [181 181 181]\n",
      "   ..., \n",
      "   [107 107 107]\n",
      "   [101 101 101]\n",
      "   [ 97  97  97]]\n",
      "\n",
      "  [[180 180 180]\n",
      "   [189 189 189]\n",
      "   [189 189 189]\n",
      "   ..., \n",
      "   [105 105 105]\n",
      "   [103 103 103]\n",
      "   [ 96  96  96]]\n",
      "\n",
      "  [[190 190 190]\n",
      "   [202 202 202]\n",
      "   [192 192 192]\n",
      "   ..., \n",
      "   [105 105 105]\n",
      "   [103 103 103]\n",
      "   [ 99  99  99]]]\n",
      "\n",
      "\n",
      " [[[103 103 103]\n",
      "   [ 36  36  36]\n",
      "   [ 18  18  18]\n",
      "   ..., \n",
      "   [  9   9   9]\n",
      "   [ 11  11  11]\n",
      "   [ 15  15  15]]\n",
      "\n",
      "  [[113 113 113]\n",
      "   [ 62  62  62]\n",
      "   [ 32  32  32]\n",
      "   ..., \n",
      "   [ 13  13  13]\n",
      "   [ 10  10  10]\n",
      "   [ 14  14  14]]\n",
      "\n",
      "  [[105 105 105]\n",
      "   [ 60  60  60]\n",
      "   [ 37  37  37]\n",
      "   ..., \n",
      "   [ 13  13  13]\n",
      "   [ 10  10  10]\n",
      "   [ 15  15  15]]\n",
      "\n",
      "  ..., \n",
      "  [[168 168 168]\n",
      "   [155 155 155]\n",
      "   [152 152 152]\n",
      "   ..., \n",
      "   [156 156 156]\n",
      "   [157 157 157]\n",
      "   [128 128 128]]\n",
      "\n",
      "  [[170 170 170]\n",
      "   [163 163 163]\n",
      "   [166 166 166]\n",
      "   ..., \n",
      "   [161 161 161]\n",
      "   [159 159 159]\n",
      "   [126 126 126]]\n",
      "\n",
      "  [[173 173 173]\n",
      "   [151 151 151]\n",
      "   [145 145 145]\n",
      "   ..., \n",
      "   [161 161 161]\n",
      "   [163 163 163]\n",
      "   [136 136 136]]]\n",
      "\n",
      "\n",
      " [[[ 86  86  86]\n",
      "   [ 82  82  82]\n",
      "   [ 11  11  11]\n",
      "   ..., \n",
      "   [  8   8   8]\n",
      "   [  6   6   6]\n",
      "   [  7   7   7]]\n",
      "\n",
      "  [[ 80  80  80]\n",
      "   [ 75  75  75]\n",
      "   [ 28  28  28]\n",
      "   ..., \n",
      "   [  7   7   7]\n",
      "   [  7   7   7]\n",
      "   [  7   7   7]]\n",
      "\n",
      "  [[ 87  87  87]\n",
      "   [ 81  81  81]\n",
      "   [ 27  27  27]\n",
      "   ..., \n",
      "   [  8   8   8]\n",
      "   [  7   7   7]\n",
      "   [  6   6   6]]\n",
      "\n",
      "  ..., \n",
      "  [[ 98  98  98]\n",
      "   [ 83  83  83]\n",
      "   [ 67  67  67]\n",
      "   ..., \n",
      "   [ 95  95  95]\n",
      "   [ 95  95  95]\n",
      "   [ 91  91  91]]\n",
      "\n",
      "  [[ 93  93  93]\n",
      "   [ 79  79  79]\n",
      "   [ 66  66  66]\n",
      "   ..., \n",
      "   [ 94  94  94]\n",
      "   [ 95  95  95]\n",
      "   [ 94  94  94]]\n",
      "\n",
      "  [[ 91  91  91]\n",
      "   [ 79  79  79]\n",
      "   [ 64  64  64]\n",
      "   ..., \n",
      "   [ 94  94  94]\n",
      "   [ 94  94  94]\n",
      "   [ 97  97  97]]]]\n"
     ]
    }
   ],
   "source": [
    "\n",
    "#加载数据集\n",
    "img_path=[]\n",
    "def loadpath(input_dir):\n",
    "    for (path, dirnames, filenames) in os.walk(input_dir):\n",
    "        for dirname in dirnames:\n",
    "            img_path.append(path+'/'+dirname)\n",
    "        return img_path\n",
    "\n",
    "path= loadpath(train_data_dir)\n",
    "imgs=[]\n",
    "labs=[]\n",
    "def readData(paths):\n",
    "    for path in paths:\n",
    "        for filename in os.listdir(path):\n",
    "            if filename.endswith('.tif'):\n",
    "                filename = path + '/' + filename\n",
    "                print(filename)\n",
    "                img = cv2.imread(filename)\n",
    "                imgs.append(img)\n",
    "                labs.append(path)\n",
    "\n",
    "                \n",
    "#数据录入处理\n",
    "readData(path)\n",
    "for lab in labs:\n",
    "    for i in range(len(path)):\n",
    "        if lab ==  path[i]:\n",
    "            lab=i+1\n",
    "imgs = np.array(imgs)\n",
    "print(imgs)\n",
    "data_dummy=pd.get_dummies(labs)\n",
    "labs = np.array(data_dummy)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train size:1386, test size:14\n"
     ]
    }
   ],
   "source": [
    "# 随机划分测试集与训练集\n",
    "size=80\n",
    "import random\n",
    "from sklearn.model_selection import train_test_split\n",
    "train_x,test_x,train_y,test_y = train_test_split(imgs,\n",
    "                                                 labs,\n",
    "                                                 test_size=0.01, \n",
    "                                                 random_state=random.randint(0,100))\n",
    "# 参数：图片数据的总数，图片的高、宽、通道\n",
    "train_x = train_x.reshape(train_x.shape[0], size, size, 3)\n",
    "\n",
    "test_x = test_x.reshape(test_x.shape[0], size, size, 3)\n",
    "# 将数据转换成小于1的数\n",
    "train_x = train_x.astype('float32')/255.0\n",
    "test_x = test_x.astype('float32')/255.0\n",
    "print('train size:%s, test size:%s' % (len(train_x), len(test_x)))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/50\n",
      "1386/1386 [==============================] - 714s 515ms/step - loss: 6.1169 - acc: 0.0180\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\tool\\python\\lib\\site-packages\\keras\\callbacks.py:432: RuntimeWarning: Can save best model only with val_acc available, skipping.\n",
      "  'skipping.' % (self.monitor), RuntimeWarning)\n",
      "C:\\tool\\python\\lib\\site-packages\\keras\\callbacks.py:1043: RuntimeWarning: Reduce LR on plateau conditioned on metric `val_acc` which is not available. Available metrics are: loss,acc,lr\n",
      "  (self.monitor, ','.join(list(logs.keys()))), RuntimeWarning\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 2/50\n",
      " 875/1386 [=================>............] - ETA: 5:06 - loss: 5.0119 - acc: 0.0663"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-9-e8deb677c3dd>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[0mcheckpoint\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mModelCheckpoint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'weights.hdf5'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmonitor\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'val_acc'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msave_best_only\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmode\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'max'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mperiod\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[1;31m#训练模型\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mmodel\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtrain_x\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtrain_y\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mepochs\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m50\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mbatch_size\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m25\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mcallbacks\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mcheckpoint\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mlearning_rate_reduction\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      4\u001b[0m \u001b[1;31m#model.fit_generator(data_generator(path,labs,batch_size),samples_per_epoch=len(labs)//20,nb_epoch=20,validation_data=data_generator(path,labs,batch_size),nb_val_samples=len(labs)//20,callbacks=[checkpoint,learning_rate_reduction])\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      5\u001b[0m \u001b[1;31m#model.fit_generator(data_generator(trian_img_paths,train_labels,batch_size),samples_per_epoch=len(train_labels)//32,nb_epoch=10,validation_data=data_generator(trian_img_paths1,train_labels1,batch_size),nb_val_samples=len(train_labels1)//32,callbacks=[checkpoint])\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\tool\\python\\lib\\site-packages\\keras\\engine\\training.py\u001b[0m in \u001b[0;36mfit\u001b[1;34m(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, **kwargs)\u001b[0m\n\u001b[0;32m   1035\u001b[0m                                         \u001b[0minitial_epoch\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0minitial_epoch\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1036\u001b[0m                                         \u001b[0msteps_per_epoch\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0msteps_per_epoch\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1037\u001b[1;33m                                         validation_steps=validation_steps)\n\u001b[0m\u001b[0;32m   1038\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1039\u001b[0m     def evaluate(self, x=None, y=None,\n",
      "\u001b[1;32mC:\\tool\\python\\lib\\site-packages\\keras\\engine\\training_arrays.py\u001b[0m in \u001b[0;36mfit_loop\u001b[1;34m(model, f, ins, out_labels, batch_size, epochs, verbose, callbacks, val_f, val_ins, shuffle, callback_metrics, initial_epoch, steps_per_epoch, validation_steps)\u001b[0m\n\u001b[0;32m    197\u001b[0m                     \u001b[0mins_batch\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mins_batch\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtoarray\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    198\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 199\u001b[1;33m                 \u001b[0mouts\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mins_batch\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    200\u001b[0m                 \u001b[0mouts\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mto_list\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mouts\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    201\u001b[0m                 \u001b[1;32mfor\u001b[0m \u001b[0ml\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mo\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mout_labels\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mouts\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\tool\\python\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py\u001b[0m in \u001b[0;36m__call__\u001b[1;34m(self, inputs)\u001b[0m\n\u001b[0;32m   2664\u001b[0m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_legacy_call\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2665\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2666\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_call\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0minputs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   2667\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2668\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0mpy_any\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mis_tensor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mx\u001b[0m \u001b[1;32min\u001b[0m \u001b[0minputs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\tool\\python\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py\u001b[0m in \u001b[0;36m_call\u001b[1;34m(self, inputs)\u001b[0m\n\u001b[0;32m   2634\u001b[0m                                 \u001b[0msymbol_vals\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2635\u001b[0m                                 session)\n\u001b[1;32m-> 2636\u001b[1;33m         \u001b[0mfetched\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_callable_fn\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0marray_vals\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   2637\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mfetched\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0moutputs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2638\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\tool\\python\\lib\\site-packages\\tensorflow\\python\\client\\session.py\u001b[0m in \u001b[0;36m__call__\u001b[1;34m(self, *args)\u001b[0m\n\u001b[0;32m   1449\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_session\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_created_with_new_api\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1450\u001b[0m           return tf_session.TF_SessionRunCallable(\n\u001b[1;32m-> 1451\u001b[1;33m               self._session._session, self._handle, args, status, None)\n\u001b[0m\u001b[0;32m   1452\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1453\u001b[0m           return tf_session.TF_DeprecatedSessionRunCallable(\n",
      "\u001b[1;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "checkpoint = ModelCheckpoint('weights.hdf5', monitor='val_acc', verbose=1, save_best_only=True, mode='max', period=1)\n",
    "#训练模型\n",
    "model.fit(train_x, train_y, epochs=50, batch_size=25,callbacks=[checkpoint,learning_rate_reduction])\n",
    "model.save(os.path.join('./', 'my_model_resnet.h5'))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.4"
  },
  "widgets": {
   "state": {},
   "version": "1.1.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
